#include"tcp_server.hpp"

//./tcp_server port
void static Usage(char* proc)
{
    std::cout<<"\nUsage"<<proc<<" "<<"port"<<std::endl;
}
int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(1);
    }
    else
    {
        uint16_t port=atoi(argv[1]);
        TcpServer*tcp_server=new TcpServer(port);
        tcp_server->init();
        tcp_server->start();
    }
    return 0;
}